import random
import string

password_length=int(input("请输入密码长度："))

characters=string.ascii_letters+string.digits

random_password=''.join(random.choice(characters) for _ in range(password_length))

print("已生成密码：",random_password)